xen: Implement xen/alternative-call.h for use in common code
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Sep 2021 20:12:56 +0000 (16:12 -0400)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Sep 2021 19:30:26 +0000 (20:30 +0100)
commitf26bb285949b8c233816c4c6a87237ee14a06ebc
tree89a7ea7b5e365f716dfb61e70bef861ef8ab55e5
parentc76cfada1cfad05aaf64ce3ad305c5467650e782
xen: Implement xen/alternative-call.h for use in common code

The alternative call infrastructure is x86-only for now, but the common iommu
code has a variant and more common code wants to use the infrastructure.

Introduce CONFIG_ALTERNATIVE_CALL and a conditional implementation so common
code can use the optimisation when available, without requiring all
architectures to implement no-op stubs.

Write some documentation, which was thus far entirely absent, covering the
requirements for an architecture to implement this optimisation, and how to
use the infrastructure in general code.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/Kconfig
xen/common/Kconfig
xen/include/xen/alternative-call.h [new file with mode: 0644]